﻿#ifndef _CUSTOMPAGE_H_
#define _CUSTOMPAGE_H_

#include <QWebEnginePage>

class CustomPage : public QWebEnginePage
{
public:
	CustomPage();
	~CustomPage();

	virtual bool certificateError(const QWebEngineCertificateError& certificateError) override;
	virtual bool acceptNavigationRequest(const QUrl& url, NavigationType type, bool isMainFrame) override;
    virtual bool javaScriptPrompt(const QUrl &securityOrigin, const QString& msg, const QString& defaultValue, QString* result) override;

	virtual QWebEnginePage* createWindow(WebWindowType type) override;
};

#endif // CUSTOMWEBENGINEPAGE_H
